using System;
using System.Collections.Generic;
using System.ServiceModel;
using Domain;
using Domain.Items;
using ServiceDeclaration.ViewModels;

namespace ServiceDeclaration
{
    [ServiceContract]
    public interface IApplicationService
    {
        [OperationContract]
        IEnumerable<ApplicationListItem> GetApplicationList();

        [OperationContract]
        IEnumerable<TaskListItem> GetActiveTasks();

        [OperationContract]
        ApplicationViewModel GetApplicationInfo(int id);

        [OperationContract]
        TaskViewModel GetTaskInfo(int id);

        [OperationContract]
        IEnumerable<TaskListItem> GetAllTasks();

        [OperationContract]
        bool LaunchApplication(ApplicationViewModel application, DateTime time);

        [OperationContract]
        void KillTask(int id);

        [OperationContract]
        UserViewModel GetUserById(int id);

        [OperationContract]
        IEnumerable<UserViewModel> GetUserList();

        [OperationContract]
        void CreateUser(UserViewModel user);

        [OperationContract]
        UserViewModel GetUserByName(string name);

        [OperationContract]
        IEnumerable<UserViewModel> GetAllUsers();

        [OperationContract]
        void DeleteUser(UserViewModel viewModel);
    }
}